import unittest
from htmltestreport import HTMLTestReport

from common.logging_use import init_log_config
from config import BASE_DIR
from scripts.test_ihrm_add import TestIhrmEmp
from scripts.test_ihrm_add_params import TestIhrmEmpParams
import logging

# 初始化日志
init_log_config(BASE_DIR + "/log/ihrm.log")


suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestIhrmEmp))
logging.info("普通方法用例添加成功00000")
suite.addTest(unittest.makeSuite(TestIhrmEmpParams))
logging.info("参数化方法用例添加成功00000")
runner = HTMLTestReport("./report/ihrm.html", description="这是一个测试报告", title="标题")
runner.run(suite)
logging.info("报告输入完成")